home *** CD-ROM | disk | FTP | other *** search
/ OpenGL Superbible (2nd Edition) / OpenGL SuperBible e2.iso / tools / Mesa-3.0 / SRC / PIXEL.H < prev    next >
Encoding:
C/C++ Source or Header  |  1998-07-17  |  3.6 KB  |  125 lines

  1. /* $Id: pixel.h,v 3.4 1998/07/17 03:23:47 brianp Exp $ */
  2.  
  3. /*
  4.  * Mesa 3-D graphics library
  5.  * Version:  3.0
  6.  * Copyright (C) 1995-1998  Brian Paul
  7.  *
  8.  * This library is free software; you can redistribute it and/or
  9.  * modify it under the terms of the GNU Library General Public
  10.  * License as published by the Free Software Foundation; either
  11.  * version 2 of the License, or (at your option) any later version.
  12.  *
  13.  * This library is distributed in the hope that it will be useful,
  14.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  16.  * Library General Public License for more details.
  17.  *
  18.  * You should have received a copy of the GNU Library General Public
  19.  * License along with this library; if not, write to the Free
  20.  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  21.  */
  22.  
  23.  
  24. /*
  25.  * $Log: pixel.h,v $
  26.  * Revision 3.4  1998/07/17 03:23:47  brianp
  27.  * added a bunch of const's
  28.  *
  29.  * Revision 3.3  1998/03/22 16:42:05  brianp
  30.  * added 8-bit CI->RGBA pixel mapping tables
  31.  *
  32.  * Revision 3.2  1998/02/08 20:21:42  brianp
  33.  * added a bunch of rgba, ci and stencil scaling, biasing and mapping functions
  34.  *
  35.  * Revision 3.1  1998/02/01 22:15:39  brianp
  36.  * moved pixel zoom code into zoom.h
  37.  *
  38.  * Revision 3.0  1998/01/31 21:00:28  brianp
  39.  * initial rev
  40.  *
  41.  */
  42.  
  43.  
  44. #ifndef PIXEL_H
  45. #define PIXEL_H
  46.  
  47.  
  48. #include "types.h"
  49.  
  50.  
  51. /*
  52.  * API functions
  53.  */
  54.  
  55.  
  56. extern void gl_GetPixelMapfv( GLcontext *ctx, GLenum map, GLfloat *values );
  57.  
  58. extern void gl_GetPixelMapuiv( GLcontext *ctx, GLenum map, GLuint *values );
  59.  
  60. extern void gl_GetPixelMapusv( GLcontext *ctx, GLenum map, GLushort *values );
  61.  
  62.  
  63. extern void gl_PixelMapfv( GLcontext *ctx,
  64.                            GLenum map, GLint mapsize, const GLfloat *values );
  65.  
  66. extern void gl_PixelStorei( GLcontext *ctx, GLenum pname, GLint param );
  67.  
  68. extern void gl_PixelTransferf( GLcontext *ctx, GLenum pname, GLfloat param );
  69.  
  70. extern void gl_PixelZoom( GLcontext *ctx, GLfloat xfactor, GLfloat yfactor );
  71.  
  72.  
  73. /*
  74.  * Pixel processing functions
  75.  */
  76.  
  77. extern void gl_scale_and_bias_color( const GLcontext *ctx, GLuint n,
  78.                                      GLfloat red[], GLfloat green[],
  79.                                      GLfloat blue[], GLfloat alpha[] );
  80.  
  81.  
  82. extern void gl_scale_and_bias_rgba( const GLcontext *ctx, GLuint n,
  83.                                     GLubyte rgba[][4] );
  84.  
  85.  
  86. extern void gl_map_rgba( const GLcontext *ctx, GLuint n, GLubyte rgba[][4] );
  87.  
  88.  
  89. extern void gl_map_color( const GLcontext *ctx, GLuint n,
  90.                           GLfloat red[], GLfloat green[],
  91.                           GLfloat blue[], GLfloat alpha[] );
  92.  
  93.  
  94. extern void gl_shift_and_offset_ci( const GLcontext *ctx, GLuint n,
  95.                                     GLuint indexes[] );
  96.  
  97.  
  98. extern void gl_map_ci( const GLcontext *ctx, GLuint n, GLuint index[] );
  99.  
  100.  
  101. extern void gl_map_ci_to_rgba( const GLcontext *ctx,
  102.                                GLuint n, const GLuint index[],
  103.                                GLubyte rgba[][4] );
  104.  
  105.  
  106. extern void gl_map_ci8_to_rgba( const GLcontext *ctx,
  107.                                 GLuint n, const GLubyte index[],
  108.                                 GLubyte rgba[][4] );
  109.  
  110.  
  111. extern void gl_map_ci_to_color( const GLcontext *ctx,
  112.                                 GLuint n, const GLuint index[],
  113.                                 GLfloat r[], GLfloat g[],
  114.                                 GLfloat b[], GLfloat a[] );
  115.  
  116.  
  117. extern void gl_shift_and_offset_stencil( const GLcontext *ctx, GLuint n,
  118.                                          GLstencil indexes[] );
  119.  
  120.  
  121. extern void gl_map_stencil( const GLcontext *ctx, GLuint n, GLstencil index[] );
  122.  
  123.  
  124. #endif
  125.